package com.cenluan.gallery;

import com.cenluan.kit.PageKit;
import com.cenluan.login.ClearLoginInterceptor;
import com.jfinal.core.Controller;
import com.jfinal.plugin.activerecord.Page;

/**
 * 相册
 * 
 * @author peak
 * 
 */
public class GalleryController extends Controller {
	/**
	 * 相册列表
	 */
	@ClearLoginInterceptor
	public void index() {
		Page<Gallery> page = Gallery.dao.page(PageKit.getPn(this), 24, null);
		setAttr("page", page);
		setAttr("pageLink", PageKit.generateHTML(getRequest(), page));
	}

	/**
	 * 添加
	 */
	public void add() {
		createToken();
	}
	
	
}
